﻿<!DOCTYPE html>
<html lang="zh">
<head>
 <meta charset="utf-8">
 <title>HTML5文本义元素_HTML <em>标签_HTML em元素-歪脖网</title>
 <meta name="keywords" content="HTML, HTML5, HTML5文本义元素,em元素,HTML em元素" />
 <meta name="description" content="em表示强调（em 是 emphasis 的缩写），用于定义局部强调的文本，来改变句子或段落的侧重点" />
 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
 <link href="http://localhost/waibo/css/bootstrap.min.css" rel="stylesheet" />
 <link href="http://localhost/waibo/css/bootstrap-responsive.min.css" rel="stylesheet" />
 <link href="http://localhost/waibo/css/style.css" rel="stylesheet" />

 <script src="http://localhost/waibo/js/jquery.js"></script>
 <script src="http://localhost/waibo/js/script.js"></script>
</head>

<body>
 <div class="topbar">
 <div class="eyebrow hidden-phone">
 <div class="container">
 <ul class="pull-left">
   <li><a href="http://www.waibo.wang/" target="_blank">歪脖网</a>欢迎您！</li>
 </ul>
 <ul class="pull-right">
  <li><a href="http://www.waibo.wang/user/">登录</a></li>
  <li class="b">|</li>
  <li><a href="http://www.waibo.wang/user/register.asp" target="_blank">注册</a></li>
 </div>
 </div>

<div class="topnav">
<div class="container">
  <div class="row-fluid mtz">
  <div class="span3 topnav-logo">
    <a href="http://www.waibo.wang/"><p class="logo-cn">歪脖网</p><p class="logo-en hidden-phone">waibo.wang</p></a>
  </div>
  <div class="span6 nav">
   <ul>
     <li ><a href="http://www.waibo.wang/">首页</a></li>
     <li class="active"><a href="http://localhost/waibo/bible/">教程</a></li>
     <li ><a href="http://www.waibo.wang/wiki/">专栏</a></li>
     <li ><a href="http://www.waibo.wang/demo/">素材</a></li>
     <li ><a href="http://www.waibo.wang/tools/">工具</a></li>
   </ul>
  </div>
  <div class="span3 topnav-form">
  </div>
 </div>
 </div>
 </div>
 </div>


 <div class="container">
 <div class="row-fluid bible">
 <aside class="span3">
 <map id="oAll" name="oAll">
 <area title="全部展开" shape="rect" coords="0,0,22,20"  href="javascript:tree.openAll();" onfocus="blur(this);">
 <area title="全部收起" shape="rect" coords="22,0,44,20" href="javascript:tree.closeAll();" onfocus="blur(this);">
 </map>
 <header><span>目录</span><img src="http://localhost/waibo/img/map.png" usemap="#oAll"/></header>
 <script src="http://localhost/waibo/js/dtree.js"></script>
 <script src="http://localhost/waibo/bible/html5/js/tree.js"></script>
 <script>
    createTree("20301");
 </script>
 </aside>

 <main class="span9">
 <header><div class="name"><strong>HTML5宝典</strong>(第 1 版)</div><div class="section">2.3.1 文本元素</div></header>
 <div><label id="treeview"><input id="show" type="checkbox" checked /> 文档结构视图</label><span class="hit">阅读（ <span id="hit"></span> ）</div>
 <article>
<h1 class="hide-text">HTML基础</h1>
<h1 class="hide-text">HTML元素</h1>
<h2 class="hide-text">结构语义元素</h2>
<h2 class="hide-text">内容分组元素</h2>
<h2>文本语义元素</h2>
<p>HTML中，根据逻辑来划分和识别文本在网页中所起的作用，给文本添加内涵，即所谓文本语义元素。</p>
<p>除了标题元素之外，HTML还提供了许多其他的元素，来为内容作上标记，以便能够识别它们在网页中所起的作用。其中最常见的有表示文本段落的 p 元素，表示换行的 br 元素等。还有其他鲜为人知的，用来表示非常特殊的网页内容的元素，如，kbd表示由键盘输入的文本。</p>
<p>HTML5中的文本语义元素及其功能描述和示例见表表 2‑1：</p>
<table>
  <caption>表 2‑1 文本语义元素caption</>
	<thead>
		<tr>
			<th>元素</th>
			<th>功能描述及示例</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>q</td>
			<td>定义一段比较短的引用内容（q 是 quote 的缩写），浏览器默认会该引用的内容加上双引号<br/>The judge said &lt;q&gt;You can drink water from the fish tank&lt;/q&gt; but advised against it.</td>
		</tr>
		<tr>
			<td>dfn</td>
			<td>定义一个术语（dfn 是 defining instance 的缩写），浏览器会渲染为斜体<br/>The term &lt;dfn&gt;organic food&lt;/dfn&gt; refers to food produced without synthetic chemicals.</td>
		</tr>
		<tr>
			<td>abbr</td>
			<td>定义一个缩写文本（abbr 是 abbreviation 的缩写），建议在 abbr 的 title属性中描述缩写的全称，当鼠标悬停在缩写上，会提示其全称<br/>Organic food in Ireland is certified by the &lt;abbr title=&quot;Irish Organic Farmers and Growers Association&quot;&gt;IOFGA&lt;/abbr&gt;.</td>
		</tr>
		<tr>
			<td>code</td>
			<td>定义计算机代码片段（如果需要保留空格、换行等可以在 code 外面包一层 pre）<br/>The &lt;code&gt;fruitdb&lt;/code&gt; program can be used for tracking fruit production.</td>
		</tr>
		<tr>
			<td>var</td>
			<td>定义程序中的变量，浏览器会渲染为斜体，pre code var 可以结合使用<br/>If there are &lt;var&gt;n&lt;/var&gt; fruit in the bowl, at least &lt;var&gt;n&lt;/var&gt;&divide;2 will be ripe.</td>
		</tr>
		<tr>
			<td>samp</td>
			<td>定义由程序输出的示例文本（samp 是 sample 的缩写）<br/>The computer said &lt;samp&gt;Unknown error -3&lt;/samp&gt;.</td>
		</tr>
		<tr>
			<td>kbd</td>
			<td>定义由键盘输入的文本（kbd 是 keyboard 的缩写）<br/>Hit &lt;kbd&gt;F1&lt;/kbd&gt; to continue.</td>
		</tr>
		<tr>
			<td>i</td>
			<td>替代文本，浏览器会渲染为斜体Lemonade consists primarily of &lt;i&gt;Citrus limon&lt;/i&gt;.</td>
		</tr>
		<tr>
			<td>b</td>
			<td>定义关键字，浏览器会渲染为粗体<br/>Take a &lt;b&gt;lemon&lt;/b&gt; and squeeze it with a &lt;b&gt;juicer&lt;/b&gt;.</td>
		</tr>
		<tr>
			<td>u</td>
			<td>定义注释文本，浏览器会在文本下面添加下划线<br/>The mixture of apple juice and &lt;u class=&quot;spelling&quot;&gt;eldeflower&lt;/u&gt; juice is very pleasant.</td>
		</tr>
		<tr>
			<td>bdi</td>
			<td>定义用于双向文本格式（bdi 是 bi-directional isolate 的缩写）<br/>The recommended restaurant is &lt;bdi lang=&quot;&quot;&gt;My Juice Caf&eacute; (At The Beach)&lt;/bdi&gt;</td>
		</tr>
		<tr>
			<td>bdo</td>
			<td>定义文本排列的方向（bdo 是 bi-directional orientation的缩写）<br/>The proposal is to write English, but in reverse order. &quot;Juice&quot; would become &quot;&lt;bdo dir=rtl&gt;Juice&lt;/bdo&gt;&quot;</td>
		</tr>
		<tr>
			<td>span</td>
			<td>定义行内元素<br/>In French we call it &lt;span lang=&quot;fr&quot;&gt;sirop de sureau&lt;/span&gt;</td>
		</tr>
		<tr>
			<td>wbr</td>
			<td>定义换行的时机（wbr 是 word break 的缩写），处理字符型语言时，显示一段没有空格的字符串时，无论其多长都不会换行，如果有 wbr 标签，则字符串会在浏览器宽度不够时主动换行<br/>www.simply&lt;wbr&gt;orange&lt;wbr&gt;juice.com</td>
		</tr>
	</tbody>
</table>
<h3>em元素</h3>
<p>em表示强调（em 是 emphasis 的缩写），用于定义局部强调的文本，来改变句子或段落的侧重点。</p>
<p>就像说话时强调某些词语一样，对于相同的一句话，em 在句子中的位置，会影响句子的含义。即便是相同的一句话，强调的位置不同，所表示的含义往往不同。如：</p>
<p>1）没有任何强调：</p>
<pre class="prettyprint linenums">
<code>&lt;p&gt;Cats are cute animals.&lt;/p&gt;</code></pre>
<p>2）强调Cats：</p>
<pre class="prettyprint linenums">
<code>&lt;p&gt;&lt;em&gt;Cats&lt;/em&gt; are cute animals.&lt;/p&gt;</code></pre>
<p>3）强调are：</p>
<pre class="prettyprint linenums">
<code>&lt;p&gt;Cats &lt;em&gt;are&lt;/em&gt; cute animals.&lt;/p&gt;</code></pre>
<p>4）强调cute：</p>
<pre class="prettyprint linenums">
<code>&lt;p&gt;Cats are &lt;em&gt;cute&lt;/em&gt; animals.&lt;/p&gt;</code></pre>
<p>5）强调animals：</p>
<pre class="prettyprint linenums">
<code>&lt;p&gt;Cats are cute &lt;em&gt;animals&lt;/em&gt;.&lt;/p&gt;</code></pre>
<p>6）强调整句话：</p>
<pre class="prettyprint linenums">
<code>&lt;p&gt;&lt;em&gt;Cats are cute animals.&lt;/em&gt;&lt;/p&gt;</code></pre>
<p>默认情况下，浏览器都会把强调文本显示为斜体。为了突出显示强调位置的变化，这里特意将强调文本使用红色显示，请读者体会强调位置对同一句话的影响。运行结果如图 2‑16 所示：</p>
<figure><img src='http://localhost/waibo/bible/html5/img/2/em.png' title='改变强调位置' alt='改变强调位置'><figcaption>图2-16  改变强调位置</figcaption></figure><div class="author">
<p class="about">关于作者</p>
<p><a href="https://weibo.com/leiqikui">歪脖先生</a>，十五年以上软件开发经验，酷爱Web开发，精通 HTML、CSS、JavaScript、jQuery、JSON、Python、Less、Bootstrap等，著有《<a href="http://www.waibo.wang/bible/html5/">HTML宝典</a>》、《<a href="http://www.waibo.wang/bible/css3/">揭秘CSS</a>》、《<a href="http://www.waibo.wang/bible/less/">Less简明教程</a>》、《<a href="http://www.waibo.wang/bible/json/">JSON教程</a>》、《<a href="http://www.waibo.wang/bible/bootstrap2/">Bootstrap2用户指南</a>》、《<a href="http://www.waibo.wang/bible/bootstrap3/">Bootstrap3实用教程</a>》，并全部在 <a href="https://github.com/leiqikui">GitHub</a> 上开源。</p>
</div>

<div id="modalReward" class="modal hide fade modal-reward" tabindex="-1">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6>打赏</h6>
</div>
<div class="modal-body">
<div class="tabbable reward-weipay">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#weipay1">￥1</a></li>
<li><a data-toggle="tab" href="#weipay2">￥2</a></li>
<li><a data-toggle="tab" href="#weipay5">￥5</a></li>
<li><a data-toggle="tab" href="#weipay10">￥10</a></li>
<li><a data-toggle="tab" href="#weipay20">￥20</a></li>
<li><a data-toggle="tab" href="#weipayrand">其他金额</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="weipay1">
<img src="http://localhost/waibo/img/weipay1.png" alt="￥1"><span>￥1</span>
</div>
<div class="tab-pane" id="weipay2">
<img src="http://localhost/waibo/img/weipay2.png" alt="￥2"><span>￥2</span>
</div>
<div class="tab-pane" id="weipay5">
<img src="http://localhost/waibo/img/weipay5.png" alt="￥5"><span>￥5</span>
</div>
<div class="tab-pane" id="weipay10">
<img src="http://localhost/waibo/img/weipay10.png" alt="￥10"><span>￥10</span>
</div>
<div class="tab-pane" id="weipay20">
<img src="http://localhost/waibo/img/weipay20.png" alt="￥20"><span>￥20</span>
</div>
<div class="tab-pane" id="weipayrand">
<img src="http://localhost/waibo/img/weipayrand.png" alt="￥随意"><span>￥随意</span>
</div>
</div>
</div>
<div class="tabbable reward-alipay hide">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#alipay1">￥1</a></li>
<li><a data-toggle="tab" href="#alipay2">￥2</a></li>
<li><a data-toggle="tab" href="#alipay5">￥5</a></li>
<li><a data-toggle="tab" href="#alipay10">￥10</a></li>
<li><a data-toggle="tab" href="#alipay20">￥20</a></li>
<li><a data-toggle="tab" href="#alipayrand">其他金额</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="alipay1">
<img src="http://localhost/waibo/img/alipay1.png" alt="￥1"><span>￥1</span>
</div>
<div class="tab-pane" id="alipay2">
<img src="http://localhost/waibo/img/alipay2.png" alt="￥2"><span>￥2</span>
</div>
<div class="tab-pane" id="alipay5">
<img src="http://localhost/waibo/img/alipay5.png" alt="￥5"><span>￥5</span>
</div>
<div class="tab-pane" id="alipay10">
<img src="http://localhost/waibo/img/alipay10.png" alt="￥10"><span>￥10</span>
</div>
<div class="tab-pane" id="alipay20">
<img src="http://localhost/waibo/img/alipay20.png" alt="￥20"><span>￥20</span>
</div>
<div class="tab-pane" id="alipayrand">
<img src="http://localhost/waibo/img/alipayrand.png" alt="￥随意"><span>￥随意</span>
</div>
</div>
</div>
<div class="reward-method">
<label><input type="radio" name="method" value="weipay" checked><img src="http://localhost/waibo/img/weipay.png" alt="微信支付"></label>
<label><input type="radio" name="method" value="alipay"><img src="http://localhost/waibo/img/alipay.png" alt="支付宝"></label>
</div>
</div>
</div>
<div class="reward">
<p>如果本教程对您帮助很大，请随意打赏。您的支持，将鼓励我写出更好的教程！</p>
<a data-toggle="modal" href="#modalReward">赏</a>
</div>

<script src="http://localhost/waibo/js/bootstrap.min.js"></script>
 <script>
 $(function() {
    rewardMethod();
 });
 </script>
 
<div class="share">
 <div class="bdsharebuttonbox"></div>
 </div>
 <div class="page">
   <a id="prev" href="http://localhost/waibo/bible/html5/html/2/2.2.7.html" title="&#8592; 键到上一节">« 上一节</a>&#8592; 键盘方向键翻页 &#8594;<a id="next" href="http://localhost/waibo/bible/html5/html/2/2.3.2.html" title="&#8594; 键到下一节">下一节 »</a>
 </div>
 </article>
 </main>
 </div>
 </div>
 <div class="floatPanel">
	 <div class="ctrolPanel">
		 <a href="javascript:;" class="arrow top" onClick="goTop()"><span>返回顶部</span></a>
    <a href="#" class="phone"  data-target="#phone"><span>手机访问</span></a>
    <a href="#" class="wechat" data-target="#wechat"><span>关注微信</span></a>
    <a href="javascript:;" class="arrow bottom" onClick="goBottom()"><span>返回底部</span></a>
  </div>
	<div id="phone" class="popPanel">
		<div class="popPanel-inner">
			<img src="http://localhost/waibo/img/site.png" /><p class="slogan">扫码访问歪脖网</p><p>随时随地，想看就看</p>
		</div>
	</div>
	<div id="wechat" class="popPanel">
		<div class="popPanel-inner">
			<img src="http://localhost/waibo/img/weixin.png" /><p class="slogan">关注歪脖网微信</p><p>分享 web 知识、交流 web 经验</p>
		</div>
	</div>
</div>
 <footer>
 <div class="container hidden-phone">
 <div class="row-fluid">
 <div class="span2">
 <dl>
 </dl>
 </div>
 <div class="span2">
 <dl>
    <dl>
      <dt>教程</dt>
      <dd><a href="http://localhost/waibo/bible/html5/">HTML5宝典</a></dd>
      <dd><a href="http://localhost/waibo/bible/css3/">探究CSS3</a></dd>
      <dd><a href="http://localhost/waibo/bible/json/">JSON 教程</a></dd>
      <dd><a href="http://localhost/waibo/bible/es6/">ES6标准入门</a></dd>
      <dd><a href="http://localhost/waibo/bible/bootstrap2/">Bootstrap教程</a></dd>
      <dd><a href="http://localhost/waibo/bible/xcx/">微信小程序教程</a></dd>
    </dl>
 </dl>
 </div>
 <div class="span2">
 <dl>
    <dl>
     <dt>工具</dt>
     <dd><a href="http://www.waibo.wang/tools/htmlformat">HTML格式化</a></dd>
     <dd><a href="http://www.waibo.wang/tools/cssformat">CSS格式化</a></dd>
     <dd><a href="http://www.waibo.wang/tools/htmlconvert">HTML多功能转换器</a></dd>
     <dd><a href="http://www.waibo.wang/tools/xmltojson">XML和JSON转换工具</a></dd>
     <dd><a href="http://www.waibo.wang/tools/jsconfuse">JS混淆工具</a></dd>
     <dd><a href="http://www.waibo.wang/tools/jsonp">JSON在线解析</a></dd>
     <dd><a href="http://www.waibo.wang/tools/markdown">在线Markdown编辑器</a></dd>
    </dl>
 </dl>
 </div>
 <div class="span2">
 <dl>
    <dl>
     <dt>关注</dt>
    </dl>
    <div class="social">
      <img src="http://localhost/waibo/img/weixin.png" title="扫描二维码，关注歪脖网微信">
<a href="https://weibo.com/leiqikui" title="新浪微博" target="_blank"></a>
<a href="http://t.qq.com/maifang51" title="腾讯微博" target="_blank"></a>
<a href="https://github.com/leiqikui" title="Github" target="_blank"><svg width="24" height="24" version="1.1" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a>
    </div>
 </dl>
 </div>
 <div class="span2">
 <dl>
    <dl>
     <dt>赞助商</dt>
     <dd><a rel="nofollow" href="https://cloud.tencent.com/redirect.php?redirect=1005&cps_key=2291d007f3b4d08b96c0fc03c4b54499" target="_blank" title="腾讯云提供安全、稳定的云服务器"><img src="http://localhost/waibo/img/logo-qqyun.png"> 腾讯云</a></dd>
     <dd><a rel="nofollow" href="https://s.click.taobao.com/t?e=m%3D2%26s%3DJm1BMj9ta3QcQipKwQzePCperVdZeJviEViQ0P1Vf2kguMN8XjClAjPr0N2Hh94K6bMO9Kiim77lHsPu4n7AVmGhnzSVk4DlmWL0QXDWLBr%2BSLtF1Lx83hmIkXBqRClNTcEU%2BDykfuSM%2BhtH71aX6uIOTs4KMj3yjpOyWSRdiSZDEm2YKA6YIrbIzrZDfgWtwGXLU4WXsy8CZuZoOOkzXFxfvOyje0ynomfkDJRs%2BhU%3D" target="_blank" title="阿里云全民云计算"><img src="http://localhost/waibo/img/logo-aliyun.png">&nbsp; 阿里云</a></dd>
    </dl>
 </dl>
 </div>
 </div>
 </div>
 <hr/>
   <p>Copyright&copy;2017&nbsp;&nbsp;www.waibo.wang All Rights Reserved</p>
   <p>陕ICP备17020676号-1&nbsp;&nbsp;&nbsp;&nbsp;客服QQ：376601179&nbsp;&nbsp;&nbsp;&nbsp;邮箱：376601179#qq.com
 </footer>
 <script src="http://localhost/waibo/js/prettify.js"></script>
 <script>
 $(function() {
    prettyPrint();
    bible();
    load();
 });
 </script>
</body>
</html>
